package cn.baage.campus.mapper;

import cn.baage.campus.model.po.Posting;
import cn.baage.campus.model.vo.PostingDetailResVO;
import cn.baage.campus.model.vo.PostingResVO;
import cn.baage.campus.model.vo.PostingQueryReqVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description: 帖子Mapper
 * @Author: 八阿哥
 * @url: baage.cn
 * @Version: 1.0
 **/
public interface PostingMapper extends BaseMapper<Posting> {

    /**
     * 查询帖子
     *
     * @param postingQueryReqVO 查询条件
     */
    List<PostingResVO> selectPosting(PostingQueryReqVO postingQueryReqVO);

    /**
     * 获取热点帖子
     *
     * @return 热点帖子
     */
    List<PostingResVO> selectHotPosting();

    /**
     * 查询帖子详情
     *
     * @param postingId 帖子ID
     * @return 帖子详情
     */
    PostingDetailResVO selectPostingDetail(@Param("postingId") String postingId);

}
